<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<title>ParseQuery.CachePolicy</title>
<link rel="stylesheet" type="text/css" href="../../stylesheet.css" title="Style">
</head>
<body>
<script type="text/javascript"><!--
    if (location.href.indexOf('is-external=true') == -1) {
        parent.document.title="ParseQuery.CachePolicy";
    }
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar_top">
<!--   -->
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../com/parse/package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/ParseQuery.CachePolicy.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../index-all.html">Index</a></li>
<li><a href="../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../com/parse/ParseQuery.html" title="class in com.parse"><span class="strong">Prev Class</span></a></li>
<li><a href="../../com/parse/ParseQueryAdapter.html" title="class in com.parse"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../index.html?com/parse/ParseQuery.CachePolicy.html" target="_top">Frames</a></li>
<li><a href="ParseQuery.CachePolicy.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_top");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#enum_constant_summary">Enum Constants</a>&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#enum_constant_detail">Enum Constants</a>&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_top">
<!--   -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">com.parse</div>
<h2 title="Enum ParseQuery.CachePolicy" class="title">Enum ParseQuery.CachePolicy</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="http://developer.android.com/reference/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></li>
<li>
<ul class="inheritance">
<li><a href="http://developer.android.com/reference/java/lang/Enum.html?is-external=true" title="class or interface in java.lang">Enum</a>&lt;<a href="../../com/parse/ParseQuery.CachePolicy.html" title="enum in com.parse">ParseQuery.CachePolicy</a>&gt;</li>
<li>
<ul class="inheritance">
<li>com.parse.ParseQuery.CachePolicy</li>
</ul>
</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd><a href="http://developer.android.com/reference/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</a>, <a href="http://developer.android.com/reference/java/lang/Comparable.html?is-external=true" title="class or interface in java.lang">Comparable</a>&lt;<a href="../../com/parse/ParseQuery.CachePolicy.html" title="enum in com.parse">ParseQuery.CachePolicy</a>&gt;</dd>
</dl>
<dl>
<dt>Enclosing class:</dt>
<dd><a href="../../com/parse/ParseQuery.html" title="class in com.parse">ParseQuery</a>&lt;<a href="../../com/parse/ParseQuery.html" title="type parameter in ParseQuery">T</a> extends <a href="../../com/parse/ParseObject.html" title="class in com.parse">ParseObject</a>&gt;</dd>
</dl>
<hr>
<br>
<pre>public static enum <span class="strong">ParseQuery.CachePolicy</span>
extends <a href="http://developer.android.com/reference/java/lang/Enum.html?is-external=true" title="class or interface in java.lang">Enum</a>&lt;<a href="../../com/parse/ParseQuery.CachePolicy.html" title="enum in com.parse">ParseQuery.CachePolicy</a>&gt;</pre>
<div class="block"><code>CachePolicy</code> specifies different caching policies that could be used with
 <a href="../../com/parse/ParseQuery.html" title="class in com.parse"><code>ParseQuery</code></a>.
 <p/>
 This lets you show data when the user's device is offline, or when the app has just started and
 network requests have not yet had time to complete. Parse takes care of automatically flushing
 the cache when it takes up too much space.
 <p/>
 <strong>Note:</strong> Cache policy can only be set when Local Datastore is not enabled.</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../com/parse/ParseQuery.html" title="class in com.parse"><code>ParseQuery</code></a></dd></dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- =========== ENUM CONSTANT SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="enum_constant_summary">
<!--   -->
</a>
<h3>Enum Constant Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Enum Constant Summary table, listing enum constants, and an explanation">
<caption><span>Enum Constants</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colOne" scope="col">Enum Constant and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><strong><a href="../../com/parse/ParseQuery.CachePolicy.html#CACHE_ELSE_NETWORK">CACHE_ELSE_NETWORK</a></strong></code>
<div class="block">The query first tries to load from the cache, but if that fails, it loads results from the
 network.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colOne"><code><strong><a href="../../com/parse/ParseQuery.CachePolicy.html#CACHE_ONLY">CACHE_ONLY</a></strong></code>
<div class="block">The query only loads from the cache, ignoring the network.</div>
</td>
</tr>
<tr class="altColor">
<td class="colOne"><code><strong><a href="../../com/parse/ParseQuery.CachePolicy.html#CACHE_THEN_NETWORK">CACHE_THEN_NETWORK</a></strong></code>
<div class="block">The query first loads from the cache, then loads from the network.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colOne"><code><strong><a href="../../com/parse/ParseQuery.CachePolicy.html#IGNORE_CACHE">IGNORE_CACHE</a></strong></code>
<div class="block">The query does not load from the cache or save results to the cache.</div>
</td>
</tr>
<tr class="altColor">
<td class="colOne"><code><strong><a href="../../com/parse/ParseQuery.CachePolicy.html#NETWORK_ELSE_CACHE">NETWORK_ELSE_CACHE</a></strong></code>
<div class="block">The query first tries to load from the network, but if that fails, it loads results from the
 cache.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colOne"><code><strong><a href="../../com/parse/ParseQuery.CachePolicy.html#NETWORK_ONLY">NETWORK_ONLY</a></strong></code>
<div class="block">The query does not load from the cache, but it will save results to the cache.</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method_summary">
<!--   -->
</a>
<h3>Method Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span>Methods</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="../../com/parse/ParseQuery.CachePolicy.html" title="enum in com.parse">ParseQuery.CachePolicy</a></code></td>
<td class="colLast"><code><strong><a href="../../com/parse/ParseQuery.CachePolicy.html#valueOf(java.lang.String)">valueOf</a></strong>(<a href="http://developer.android.com/reference/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;name)</code>
<div class="block">Returns the enum constant of this type with the specified name.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="../../com/parse/ParseQuery.CachePolicy.html" title="enum in com.parse">ParseQuery.CachePolicy</a>[]</code></td>
<td class="colLast"><code><strong><a href="../../com/parse/ParseQuery.CachePolicy.html#values()">values</a></strong>()</code>
<div class="block">Returns an array containing the constants of this enum type, in
the order they are declared.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_Enum">
<!--   -->
</a>
<h3>Methods inherited from class&nbsp;<a href="http://developer.android.com/reference/java/lang/Enum.html?is-external=true" title="class or interface in java.lang">Enum</a></h3>
<code><a href="http://developer.android.com/reference/java/lang/Enum.html?is-external=true#clone()" title="class or interface in java.lang">clone</a>, <a href="http://developer.android.com/reference/java/lang/Enum.html?is-external=true#compareTo(E)" title="class or interface in java.lang">compareTo</a>, <a href="http://developer.android.com/reference/java/lang/Enum.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</a>, <a href="http://developer.android.com/reference/java/lang/Enum.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</a>, <a href="http://developer.android.com/reference/java/lang/Enum.html?is-external=true#getDeclaringClass()" title="class or interface in java.lang">getDeclaringClass</a>, <a href="http://developer.android.com/reference/java/lang/Enum.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</a>, <a href="http://developer.android.com/reference/java/lang/Enum.html?is-external=true#name()" title="class or interface in java.lang">name</a>, <a href="http://developer.android.com/reference/java/lang/Enum.html?is-external=true#ordinal()" title="class or interface in java.lang">ordinal</a>, <a href="http://developer.android.com/reference/java/lang/Enum.html?is-external=true#toString()" title="class or interface in java.lang">toString</a>, <a href="http://developer.android.com/reference/java/lang/Enum.html?is-external=true#valueOf(java.lang.Class,%20java.lang.String)" title="class or interface in java.lang">valueOf</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_Object">
<!--   -->
</a>
<h3>Methods inherited from class&nbsp;<a href="http://developer.android.com/reference/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3>
<code><a href="http://developer.android.com/reference/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</a>, <a href="http://developer.android.com/reference/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</a>, <a href="http://developer.android.com/reference/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</a>, <a href="http://developer.android.com/reference/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</a>, <a href="http://developer.android.com/reference/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</a>, <a href="http://developer.android.com/reference/java/lang/Object.html?is-external=true#wait(long,%20int)" title="class or interface in java.lang">wait</a></code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ ENUM CONSTANT DETAIL =========== -->
<ul class="blockList">
<li class="blockList"><a name="enum_constant_detail">
<!--   -->
</a>
<h3>Enum Constant Detail</h3>
<a name="IGNORE_CACHE">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>IGNORE_CACHE</h4>
<pre>public static final&nbsp;<a href="../../com/parse/ParseQuery.CachePolicy.html" title="enum in com.parse">ParseQuery.CachePolicy</a> IGNORE_CACHE</pre>
<div class="block">The query does not load from the cache or save results to the cache.
 <p/>
 This is the default cache policy.</div>
</li>
</ul>
<a name="CACHE_ONLY">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>CACHE_ONLY</h4>
<pre>public static final&nbsp;<a href="../../com/parse/ParseQuery.CachePolicy.html" title="enum in com.parse">ParseQuery.CachePolicy</a> CACHE_ONLY</pre>
<div class="block">The query only loads from the cache, ignoring the network.
 <p/>
 If there are no cached results, this causes a <a href="../../com/parse/ParseException.html#CACHE_MISS"><code>ParseException.CACHE_MISS</code></a>.</div>
</li>
</ul>
<a name="NETWORK_ONLY">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>NETWORK_ONLY</h4>
<pre>public static final&nbsp;<a href="../../com/parse/ParseQuery.CachePolicy.html" title="enum in com.parse">ParseQuery.CachePolicy</a> NETWORK_ONLY</pre>
<div class="block">The query does not load from the cache, but it will save results to the cache.</div>
</li>
</ul>
<a name="CACHE_ELSE_NETWORK">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>CACHE_ELSE_NETWORK</h4>
<pre>public static final&nbsp;<a href="../../com/parse/ParseQuery.CachePolicy.html" title="enum in com.parse">ParseQuery.CachePolicy</a> CACHE_ELSE_NETWORK</pre>
<div class="block">The query first tries to load from the cache, but if that fails, it loads results from the
 network.
 <p/>
 If there are no cached results, this causes a <a href="../../com/parse/ParseException.html#CACHE_MISS"><code>ParseException.CACHE_MISS</code></a>.</div>
</li>
</ul>
<a name="NETWORK_ELSE_CACHE">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>NETWORK_ELSE_CACHE</h4>
<pre>public static final&nbsp;<a href="../../com/parse/ParseQuery.CachePolicy.html" title="enum in com.parse">ParseQuery.CachePolicy</a> NETWORK_ELSE_CACHE</pre>
<div class="block">The query first tries to load from the network, but if that fails, it loads results from the
 cache.
 <p/>
 If there are no cached results, this causes a <a href="../../com/parse/ParseException.html#CACHE_MISS"><code>ParseException.CACHE_MISS</code></a>.</div>
</li>
</ul>
<a name="CACHE_THEN_NETWORK">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>CACHE_THEN_NETWORK</h4>
<pre>public static final&nbsp;<a href="../../com/parse/ParseQuery.CachePolicy.html" title="enum in com.parse">ParseQuery.CachePolicy</a> CACHE_THEN_NETWORK</pre>
<div class="block">The query first loads from the cache, then loads from the network.
 The callback will be called twice - first with the cached results, then with the network
 results. Since it returns two results at different times, this cache policy cannot be used
 with synchronous or task methods.</div>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method_detail">
<!--   -->
</a>
<h3>Method Detail</h3>
<a name="values()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>values</h4>
<pre>public static&nbsp;<a href="../../com/parse/ParseQuery.CachePolicy.html" title="enum in com.parse">ParseQuery.CachePolicy</a>[]&nbsp;values()</pre>
<div class="block">Returns an array containing the constants of this enum type, in
the order they are declared.  This method may be used to iterate
over the constants as follows:
<pre>
for (ParseQuery.CachePolicy c : ParseQuery.CachePolicy.values())
&nbsp;   System.out.println(c);
</pre></div>
<dl><dt><span class="strong">Returns:</span></dt><dd>an array containing the constants of this enum type, in the order they are declared</dd></dl>
</li>
</ul>
<a name="valueOf(java.lang.String)">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>valueOf</h4>
<pre>public static&nbsp;<a href="../../com/parse/ParseQuery.CachePolicy.html" title="enum in com.parse">ParseQuery.CachePolicy</a>&nbsp;valueOf(<a href="http://developer.android.com/reference/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;name)</pre>
<div class="block">Returns the enum constant of this type with the specified name.
The string must match <i>exactly</i> an identifier used to declare an
enum constant in this type.  (Extraneous whitespace characters are 
not permitted.)</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>name</code> - the name of the enum constant to be returned.</dd>
<dt><span class="strong">Returns:</span></dt><dd>the enum constant with the specified name</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://developer.android.com/reference/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if this enum type has no constant with the specified name</dd>
<dd><code><a href="http://developer.android.com/reference/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the argument is null</dd></dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar_bottom">
<!--   -->
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../com/parse/package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/ParseQuery.CachePolicy.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../index-all.html">Index</a></li>
<li><a href="../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../com/parse/ParseQuery.html" title="class in com.parse"><span class="strong">Prev Class</span></a></li>
<li><a href="../../com/parse/ParseQueryAdapter.html" title="class in com.parse"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../index.html?com/parse/ParseQuery.CachePolicy.html" target="_top">Frames</a></li>
<li><a href="ParseQuery.CachePolicy.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_bottom");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#enum_constant_summary">Enum Constants</a>&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#enum_constant_detail">Enum Constants</a>&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_bottom">
<!--   -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</body>
</html>
